window.PasswordGeneratorRenderer = class PasswordGeneratorRenderer {
    static getHTML() {
        return `
            <div class="tool-content">
                <h2 class="text-3xl font-bold text-gray-800 mb-6 flex items-center">
                    <i data-feather="shield" class="mr-3"></i>
                    随机密码生成器
                </h2>
                
                <div class="bg-red-50 border-l-4 border-red-400 p-4 mb-6">
                    <p class="text-red-800">
                        <i data-feather="alert-triangle" class="inline w-4 h-4 mr-1"></i>
                        生成的密码仅在本地处理，不会发送到服务器。建议立即复制并安全保存。
                    </p>
                </div>

                <div class="grid lg:grid-cols-2 gap-8">
                    <!-- 左侧：密码生成设置 -->
                    <div class="space-y-6">
                        <!-- 预设模板 -->
                        <div class="bg-white rounded-lg shadow-sm border border-gray-200 p-6">
                            <h3 class="text-xl font-semibold text-gray-800 mb-4 flex items-center">
                                <i data-feather="zap" class="w-5 h-5 mr-2"></i>
                                快速生成
                            </h3>
                            
                            <div class="grid grid-cols-2 gap-3 mb-4">
                                <button class="preset-btn bg-blue-100 hover:bg-blue-200 text-blue-800 py-3 px-4 rounded-lg transition duration-200 text-left" data-preset="simple">
                                    <div class="font-medium">简单密码</div>
                                    <div class="text-sm opacity-75">字母+数字, 12位</div>
                                </button>
                                <button class="preset-btn bg-green-100 hover:bg-green-200 text-green-800 py-3 px-4 rounded-lg transition duration-200 text-left" data-preset="standard">
                                    <div class="font-medium">标准密码</div>
                                    <div class="text-sm opacity-75">含符号, 16位</div>
                                </button>
                                <button class="preset-btn bg-purple-100 hover:bg-purple-200 text-purple-800 py-3 px-4 rounded-lg transition duration-200 text-left" data-preset="strong">
                                    <div class="font-medium">强密码</div>
                                    <div class="text-sm opacity-75">高安全性, 20位</div>
                                </button>
                                <button class="preset-btn bg-orange-100 hover:bg-orange-200 text-orange-800 py-3 px-4 rounded-lg transition duration-200 text-left" data-preset="pin">
                                    <div class="font-medium">数字PIN</div>
                                    <div class="text-sm opacity-75">纯数字, 6位</div>
                                </button>
                            </div>
                        </div>

                        <!-- 自定义设置 -->
                        <div class="bg-white rounded-lg shadow-sm border border-gray-200 p-6">
                            <h3 class="text-xl font-semibold text-gray-800 mb-4 flex items-center">
                                <i data-feather="settings" class="w-5 h-5 mr-2"></i>
                                自定义设置
                            </h3>
                            
                            <div class="space-y-4">
                                <div>
                                    <label class="flex justify-between items-center text-sm font-medium text-gray-700 mb-2">
                                        密码长度: <span id="length-display" class="text-blue-600 font-bold">12</span>
                                    </label>
                                    <input 
                                        type="range" 
                                        id="password-length" 
                                        min="4" 
                                        max="64" 
                                        value="12"
                                        class="w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer"
                                    >
                                    <div class="flex justify-between text-xs text-gray-500 mt-1">
                                        <span>4</span>
                                        <span>64</span>
                                    </div>
                                </div>

                                <div class="grid grid-cols-2 gap-4">
                                    <label class="flex items-center space-x-2">
                                        <input type="checkbox" id="include-lowercase" checked class="rounded border-gray-300">
                                        <span class="text-sm">小写字母 (a-z)</span>
                                    </label>
                                    <label class="flex items-center space-x-2">
                                        <input type="checkbox" id="include-uppercase" checked class="rounded border-gray-300">
                                        <span class="text-sm">大写字母 (A-Z)</span>
                                    </label>
                                    <label class="flex items-center space-x-2">
                                        <input type="checkbox" id="include-numbers" checked class="rounded border-gray-300">
                                        <span class="text-sm">数字 (0-9)</span>
                                    </label>
                                    <label class="flex items-center space-x-2">
                                        <input type="checkbox" id="include-symbols" class="rounded border-gray-300">
                                        <span class="text-sm">特殊符号</span>
                                    </label>
                                </div>

                                <div class="border-t pt-4">
                                    <h4 class="text-sm font-medium text-gray-700 mb-2">高级选项</h4>
                                    <div class="space-y-2">
                                        <label class="flex items-center space-x-2">
                                            <input type="checkbox" id="exclude-similar" checked class="rounded border-gray-300">
                                            <span class="text-sm">排除相似字符 (il1Lo0O)</span>
                                        </label>
                                        <label class="flex items-center space-x-2">
                                            <input type="checkbox" id="exclude-ambiguous" class="rounded border-gray-300">
                                            <span class="text-sm">排除易混淆符号 ({}[]()等)</span>
                                        </label>
                                        <label class="flex items-center space-x-2">
                                            <input type="checkbox" id="must-include-each" checked class="rounded border-gray-300">
                                            <span class="text-sm">确保包含每种字符类型</span>
                                        </label>
                                    </div>
                                </div>

                                <div>
                                    <label class="block text-sm font-medium text-gray-700 mb-2">自定义字符</label>
                                    <input 
                                        type="text" 
                                        id="custom-chars" 
                                        placeholder="添加自定义字符..."
                                        class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
                                    >
                                </div>

                                <button id="generate-custom" class="w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 px-4 rounded-lg transition duration-200 flex items-center justify-center">
                                    <i data-feather="refresh-cw" class="w-4 h-4 mr-2"></i>
                                    生成自定义密码
                                </button>
                            </div>
                        </div>

                        <!-- 记忆辅助密码 -->
                        <div class="bg-white rounded-lg shadow-sm border border-gray-200 p-6">
                            <h3 class="text-xl font-semibold text-gray-800 mb-4 flex items-center">
                                <i data-feather="brain" class="w-5 h-5 mr-2"></i>
                                记忆辅助密码
                            </h3>
                            
                            <div class="space-y-4">
                                <div class="grid grid-cols-2 gap-4">
                                    <div>
                                        <label class="block text-sm font-medium text-gray-700 mb-2">词汇数量</label>
                                        <select id="word-count" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
                                            <option value="3">3个词</option>
                                            <option value="4" selected>4个词</option>
                                            <option value="5">5个词</option>
                                            <option value="6">6个词</option>
                                        </select>
                                    </div>
                                    <div>
                                        <label class="block text-sm font-medium text-gray-700 mb-2">分隔符</label>
                                        <select id="word-separator" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
                                            <option value="-">连字符 (-)</option>
                                            <option value="_">下划线 (_)</option>
                                            <option value=".">点号 (.)</option>
                                            <option value="">无分隔符</option>
                                        </select>
                                    </div>
                                </div>

                                <div class="flex space-x-4">
                                    <label class="flex items-center space-x-2">
                                        <input type="checkbox" id="memorable-numbers" checked class="rounded border-gray-300">
                                        <span class="text-sm">添加数字</span>
                                    </label>
                                    <label class="flex items-center space-x-2">
                                        <input type="checkbox" id="memorable-symbols" class="rounded border-gray-300">
                                        <span class="text-sm">添加符号</span>
                                    </label>
                                    <label class="flex items-center space-x-2">
                                        <input type="checkbox" id="capitalize-words" checked class="rounded border-gray-300">
                                        <span class="text-sm">首字母大写</span>
                                    </label>
                                </div>

                                <button id="generate-memorable" class="w-full bg-purple-600 hover:bg-purple-700 text-white font-bold py-3 px-4 rounded-lg transition duration-200 flex items-center justify-center">
                                    <i data-feather="type" class="w-4 h-4 mr-2"></i>
                                    生成记忆辅助密码
                                </button>
                            </div>
                        </div>
                    </div>

                    <!-- 右侧：密码结果与分析 -->
                    <div class="space-y-6">
                        <!-- 生成结果 -->
                        <div class="bg-white rounded-lg shadow-sm border border-gray-200 p-6">
                            <div class="flex justify-between items-center mb-4">
                                <h3 class="text-xl font-semibold text-gray-800">生成的密码</h3>
                                <div class="flex space-x-2">
                                    <button id="toggle-visibility" class="text-gray-400 hover:text-gray-600 transition-colors" title="显示/隐藏密码">
                                        <i data-feather="eye" class="w-5 h-5"></i>
                                    </button>
                                    <button id="copy-password" class="bg-green-600 hover:bg-green-700 text-white text-sm px-3 py-1 rounded flex items-center">
                                        <i data-feather="copy" class="w-4 h-4 mr-1"></i>
                                        复制
                                    </button>
                                </div>
                            </div>
                            
                            <div class="relative">
                                <input 
                                    type="password" 
                                    id="generated-password" 
                                    readonly
                                    placeholder="点击上方按钮生成密码..."
                                    class="w-full px-3 py-3 border border-gray-300 rounded-lg bg-gray-50 font-mono text-lg text-center"
                                >
                            </div>

                            <div class="mt-4 flex space-x-2">
                                <button id="regenerate" class="flex-1 bg-blue-600 hover:bg-blue-700 text-white py-2 px-3 rounded-lg transition duration-200 flex items-center justify-center">
                                    <i data-feather="refresh-cw" class="w-4 h-4 mr-1"></i>
                                    重新生成
                                </button>
                                <button id="check-breached" class="flex-1 bg-orange-600 hover:bg-orange-700 text-white py-2 px-3 rounded-lg transition duration-200 flex items-center justify-center">
                                    <i data-feather="shield-check" class="w-4 h-4 mr-1"></i>
                                    安全检查
                                </button>
                            </div>
                        </div>

                        <!-- 密码强度分析 -->
                        <div id="strength-analysis" class="bg-white rounded-lg shadow-sm border border-gray-200 p-6" style="display: none;">
                            <h3 class="text-xl font-semibold text-gray-800 mb-4 flex items-center">
                                <i data-feather="bar-chart" class="w-5 h-5 mr-2"></i>
                                强度分析
                            </h3>
                            
                            <div class="space-y-4">
                                <div>
                                    <div class="flex justify-between items-center mb-2">
                                        <span class="text-sm font-medium text-gray-700">密码强度</span>
                                        <span id="strength-text" class="text-sm font-bold">-</span>
                                    </div>
                                    <div class="w-full bg-gray-200 rounded-full h-3">
                                        <div id="strength-bar" class="h-3 rounded-full transition-all duration-500" style="width: 0%"></div>
                                    </div>
                                    <div class="text-xs text-gray-500 mt-1">
                                        得分: <span id="strength-score">0</span>/100
                                    </div>
                                </div>

                                <div class="grid grid-cols-2 gap-4">
                                    <div class="text-center p-3 bg-gray-50 rounded-lg">
                                        <div id="password-length-stat" class="text-2xl font-bold text-blue-600">0</div>
                                        <div class="text-sm text-gray-600">字符长度</div>
                                    </div>
                                    <div class="text-center p-3 bg-gray-50 rounded-lg">
                                        <div id="charset-size" class="text-2xl font-bold text-green-600">0</div>
                                        <div class="text-sm text-gray-600">字符集大小</div>
                                    </div>
                                </div>

                                <div id="strength-feedback" class="space-y-2"></div>
                            </div>
                        </div>

                        <!-- 批量生成 -->
                        <div class="bg-white rounded-lg shadow-sm border border-gray-200 p-6">
                            <h3 class="text-xl font-semibold text-gray-800 mb-4 flex items-center">
                                <i data-feather="layers" class="w-5 h-5 mr-2"></i>
                                批量生成
                            </h3>
                            
                            <div class="space-y-4">
                                <div class="grid grid-cols-2 gap-4">
                                    <div>
                                        <label class="block text-sm font-medium text-gray-700 mb-2">数量</label>
                                        <input 
                                            type="number" 
                                            id="batch-count" 
                                            value="10" 
                                            min="1" 
                                            max="100"
                                            class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
                                        >
                                    </div>
                                    <div>
                                        <label class="block text-sm font-medium text-gray-700 mb-2">分隔符</label>
                                        <select id="batch-separator" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
                                            <option value="\\n">换行符</option>
                                            <option value=",">逗号</option>
                                            <option value="; ">分号+空格</option>
                                            <option value="\\t">制表符</option>
                                        </select>
                                    </div>
                                </div>

                                <button id="generate-batch" class="w-full bg-purple-600 hover:bg-purple-700 text-white font-bold py-3 px-4 rounded-lg transition duration-200 flex items-center justify-center">
                                    <i data-feather="layers" class="w-4 h-4 mr-2"></i>
                                    批量生成密码
                                </button>

                                <div class="relative">
                                    <textarea 
                                        id="batch-output" 
                                        readonly
                                        placeholder="批量生成的密码将显示在这里..."
                                        class="w-full h-32 px-3 py-2 border border-gray-300 rounded-lg bg-gray-50 font-mono text-sm resize-none"
                                    ></textarea>
                                    <div class="absolute top-2 right-2 flex space-x-1">
                                        <button id="copy-batch" class="bg-green-600 hover:bg-green-700 text-white text-xs px-2 py-1 rounded flex items-center">
                                            <i data-feather="copy" class="w-3 h-3 mr-1"></i>
                                            复制
                                        </button>
                                        <button id="download-batch" class="bg-gray-600 hover:bg-gray-700 text-white text-xs px-2 py-1 rounded flex items-center">
                                            <i data-feather="download" class="w-3 h-3 mr-1"></i>
                                            下载
                                        </button>
                                    </div>
                                </div>

                                <div class="text-sm text-gray-600">
                                    <span id="batch-stats">等待生成...</span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 密码安全提示 -->
                <div class="mt-8 bg-blue-50 rounded-lg p-6">
                    <h3 class="text-lg font-semibold text-gray-800 mb-4">密码安全建议</h3>
                    <div class="grid md:grid-cols-2 gap-6 text-sm text-gray-600">
                        <div>
                            <h4 class="font-medium text-gray-700 mb-2">强密码特征</h4>
                            <ul class="space-y-1">
                                <li>• 长度至少12位，推荐16位以上</li>
                                <li>• 包含大小写字母、数字和符号</li>
                                <li>• 避免使用常见词汇和个人信息</li>
                                <li>• 不重复使用相同密码</li>
                            </ul>
                        </div>
                        <div>
                            <h4 class="font-medium text-gray-700 mb-2">密码管理</h4>
                            <ul class="space-y-1">
                                <li>• 使用密码管理器存储密码</li>
                                <li>• 定期更换重要账户密码</li>
                                <li>• 启用双因素认证</li>
                                <li>• 不在不安全的地方输入密码</li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        `;
    }

    static init() {
        // 获取所有DOM元素
        const lengthSlider = document.getElementById('password-length');
        const lengthDisplay = document.getElementById('length-display');
        const generatedPassword = document.getElementById('generated-password');
        const copyPasswordBtn = document.getElementById('copy-password');
        const toggleVisibilityBtn = document.getElementById('toggle-visibility');
        const regenerateBtn = document.getElementById('regenerate');
        const checkBreachedBtn = document.getElementById('check-breached');
        const generateCustomBtn = document.getElementById('generate-custom');
        const generateMemorableBtn = document.getElementById('generate-memorable');
        const generateBatchBtn = document.getElementById('generate-batch');
        const copyBatchBtn = document.getElementById('copy-batch');
        const downloadBatchBtn = document.getElementById('download-batch');
        const batchOutput = document.getElementById('batch-output');
        const batchStats = document.getElementById('batch-stats');

        // 强度分析元素
        const strengthAnalysis = document.getElementById('strength-analysis');
        const strengthBar = document.getElementById('strength-bar');
        const strengthText = document.getElementById('strength-text');
        const strengthScore = document.getElementById('strength-score');
        const strengthFeedback = document.getElementById('strength-feedback');
        const passwordLengthStat = document.getElementById('password-length-stat');
        const charsetSize = document.getElementById('charset-size');

        let currentPassword = '';
        let lastUsedOptions = {};

        // 长度滑块更新
        lengthSlider.addEventListener('input', () => {
            lengthDisplay.textContent = lengthSlider.value;
        });

        // 预设模板点击
        document.querySelectorAll('.preset-btn').forEach(btn => {
            btn.addEventListener('click', () => {
                const preset = btn.dataset.preset;
                generatePresetPassword(preset);
            });
        });

        // 生成预设密码
        const generatePresetPassword = (presetName) => {
            const preset = PasswordGenerator.PRESETS[presetName];
            if (!preset) return;

            const result = PasswordGenerator.generate(preset.length, preset.options);
            if (result.success) {
                displayPassword(result.data);
                lastUsedOptions = { length: preset.length, ...preset.options };
            } else {
                DevToolsUtils.showToast(result.error, 'error');
            }
        };

        // 生成自定义密码
        const generateCustomPassword = () => {
            const length = parseInt(lengthSlider.value);
            const options = {
                includeLowercase: document.getElementById('include-lowercase').checked,
                includeUppercase: document.getElementById('include-uppercase').checked,
                includeNumbers: document.getElementById('include-numbers').checked,
                includeSymbols: document.getElementById('include-symbols').checked,
                excludeSimilar: document.getElementById('exclude-similar').checked,
                excludeAmbiguous: document.getElementById('exclude-ambiguous').checked,
                mustIncludeEach: document.getElementById('must-include-each').checked,
                customChars: document.getElementById('custom-chars').value
            };

            const result = PasswordGenerator.generate(length, options);
            if (result.success) {
                displayPassword(result.data);
                lastUsedOptions = { length, ...options };
            } else {
                DevToolsUtils.showToast(result.error, 'error');
            }
        };

        // 生成记忆辅助密码
        const generateMemorablePassword = () => {
            const options = {
                wordCount: parseInt(document.getElementById('word-count').value),
                separator: document.getElementById('word-separator').value,
                includeNumbers: document.getElementById('memorable-numbers').checked,
                includeSymbols: document.getElementById('memorable-symbols').checked,
                capitalizeWords: document.getElementById('capitalize-words').checked
            };

            const result = PasswordGenerator.generateMemorable(options);
            if (result.success) {
                displayPassword(result.data);
                lastUsedOptions = { memorable: true, ...options };
            } else {
                DevToolsUtils.showToast(result.error, 'error');
            }
        };

        // 显示密码和分析
        const displayPassword = (data) => {
            currentPassword = data.password;
            generatedPassword.value = data.password;
            
            // 显示强度分析
            strengthAnalysis.style.display = 'block';
            
            if (data.strength) {
                const strength = data.strength;
                strengthText.textContent = strength.description;
                strengthText.className = `text-sm font-bold ${strength.color}`;
                strengthScore.textContent = strength.score;
                strengthBar.style.width = `${strength.score}%`;
                strengthBar.className = `h-3 rounded-full transition-all duration-500 ${getStrengthBarColor(strength.level)}`;
                
                passwordLengthStat.textContent = data.password.length;
                charsetSize.textContent = data.charset || 'N/A';

                // 显示反馈
                strengthFeedback.innerHTML = '';
                if (strength.feedback && strength.feedback.length > 0) {
                    strength.feedback.forEach(feedback => {
                        const feedbackDiv = document.createElement('div');
                        feedbackDiv.className = 'text-sm text-orange-600 bg-orange-50 px-3 py-2 rounded-lg';
                        feedbackDiv.innerHTML = `<i data-feather="info" class="inline w-4 h-4 mr-1"></i>${feedback}`;
                        strengthFeedback.appendChild(feedbackDiv);
                    });
                    setTimeout(() => feather.replace(), 100);
                }
            }
        };

        // 获取强度条颜色
        const getStrengthBarColor = (level) => {
            const colors = {
                'very-weak': 'bg-red-500',
                'weak': 'bg-orange-500',
                'medium': 'bg-yellow-500',
                'strong': 'bg-blue-500',
                'very-strong': 'bg-green-500'
            };
            return colors[level] || 'bg-gray-500';
        };

        // 切换密码可见性
        let passwordVisible = false;
        toggleVisibilityBtn.addEventListener('click', () => {
            passwordVisible = !passwordVisible;
            generatedPassword.type = passwordVisible ? 'text' : 'password';
            toggleVisibilityBtn.innerHTML = passwordVisible ? 
                '<i data-feather="eye-off" class="w-5 h-5"></i>' : 
                '<i data-feather="eye" class="w-5 h-5"></i>';
            setTimeout(() => feather.replace(), 100);
        });

        // 复制密码
        copyPasswordBtn.addEventListener('click', async () => {
            if (!currentPassword) {
                DevToolsUtils.showToast('请先生成密码', 'error');
                return;
            }
            
            const success = await DevToolsUtils.copyToClipboard(currentPassword);
            if (success) {
                DevToolsUtils.showToast('密码已复制到剪贴板', 'success');
                generatedPassword.classList.add('success-border');
                setTimeout(() => {
                    generatedPassword.classList.remove('success-border');
                }, 2000);
            }
        });

        // 重新生成
        regenerateBtn.addEventListener('click', () => {
            if (lastUsedOptions.memorable) {
                generateMemorablePassword();
            } else {
                generateCustomPassword();
            }
        });

        // 安全检查
        checkBreachedBtn.addEventListener('click', () => {
            if (!currentPassword) {
                DevToolsUtils.showToast('请先生成密码', 'error');
                return;
            }

            const result = PasswordGenerator.checkBreached(currentPassword);
            if (result.success) {
                const isBreached = result.data.breached;
                DevToolsUtils.showToast(result.data.message, isBreached ? 'error' : 'success');
            } else {
                DevToolsUtils.showToast(result.error, 'error');
            }
        });

        // 批量生成
        generateBatchBtn.addEventListener('click', () => {
            const count = parseInt(document.getElementById('batch-count').value) || 10;
            const separator = document.getElementById('batch-separator').value.replace('\\n', '\n').replace('\\t', '\t');
            
            if (!lastUsedOptions.length) {
                DevToolsUtils.showToast('请先生成一个密码以确定设置', 'error');
                return;
            }

            DevToolsUtils.addLoading(generateBatchBtn, '生成中...');

            setTimeout(() => {
                const options = { ...lastUsedOptions, separator };
                const result = lastUsedOptions.memorable ? 
                    PasswordGenerator.generateBatch(count, 12, { memorable: true }) :
                    PasswordGenerator.generateBatch(count, lastUsedOptions.length, options);

                if (result.success) {
                    batchOutput.value = result.data.output;
                    batchStats.textContent = `已生成 ${result.data.count} 个密码`;
                    DevToolsUtils.showToast(`已生成 ${result.data.count} 个密码`, 'success');
                } else {
                    DevToolsUtils.showToast(result.error, 'error');
                    batchStats.textContent = '生成失败';
                }

                DevToolsUtils.removeLoading(generateBatchBtn, '批量生成密码');
            }, 200);
        });

        // 复制批量结果
        copyBatchBtn.addEventListener('click', async () => {
            if (!batchOutput.value.trim()) {
                DevToolsUtils.showToast('没有可复制的内容', 'error');
                return;
            }
            
            const success = await DevToolsUtils.copyToClipboard(batchOutput.value);
            if (success) {
                DevToolsUtils.showToast('已复制到剪贴板', 'success');
            }
        });

        // 下载批量结果
        downloadBatchBtn.addEventListener('click', () => {
            if (!batchOutput.value.trim()) {
                DevToolsUtils.showToast('没有可下载的内容', 'error');
                return;
            }

            const filename = `passwords_${new Date().getTime()}.txt`;
            const blob = new Blob([batchOutput.value], { type: 'text/plain;charset=utf-8' });
            const url = URL.createObjectURL(blob);
            const a = document.createElement('a');
            a.href = url;
            a.download = filename;
            document.body.appendChild(a);
            a.click();
            document.body.removeChild(a);
            URL.revokeObjectURL(url);
            
            DevToolsUtils.showToast('文件下载已开始', 'success');
        });

        // 事件监听器
        generateCustomBtn.addEventListener('click', generateCustomPassword);
        generateMemorableBtn.addEventListener('click', generateMemorablePassword);

        // 键盘快捷键
        document.addEventListener('keydown', (e) => {
            if (e.ctrlKey && e.key === 'Enter') {
                generateCustomPassword();
            }
        });

        // 初始生成一个标准密码
        generatePresetPassword('standard');

        // 初始化图标
        setTimeout(() => {
            if (typeof feather !== 'undefined') {
                feather.replace();
            }
        }, 100);
    }
};